package com.example.blinkhome.fragment;


import com.example.blinkhome.R;
import com.example.blinkhome.activity.MainActivity;
import com.example.blinkhome.activity.SearchDevicesActivity;
import com.orhanobut.logger.Logger;

import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;

public class HomeFragment extends Fragment{

	private ImageView iv1,iv2,iv3;
	private Button b1;
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		// TODO Auto-generated method stub\
		View mView = inflater.inflate(R.layout.fragment_home, null);
		initview(mView);
		click();
		return mView;
	}
	
	private void initview(View v){
		iv1=(ImageView) v.findViewById(R.id.imageView2);
		iv2=(ImageView) v.findViewById(R.id.imageView3);
		iv3=(ImageView) v.findViewById(R.id.imageView4);
		b1=(Button) v.findViewById(R.id.button1);
		
	}
	
	private void click(){
		b1.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent=new Intent(getActivity(),SearchDevicesActivity.class);
				startActivity(intent);
			}
		});
	}
	
}
